         **************************************************************
         *   Lunar: The Silver Star (Sega CD) - WORKED Design Patch   *
         *                 Version 0 (1 Apr. 2017)                    *
         *            by Supper (suppertails66@gmail.com)             *
         **************************************************************

This is a patch that aims to further the magnificent work done to Lunar: The 
Silver Star by its US publisher, Working Designs. The game's original US release 
increased a number of enemies' stats and makes various other welcome changes, 
such as rewriting the boring, brain-dead Japanese script to include fart jokes 
and dated cultural gags. While the English script is absolute perfection, this 
game was one of Working Designs' earlier efforts, and so the difficulty was not 
cranked up to nearly the levels of later games like Lunar: Eternal Blue. That's 
what this patch is here to fix!

              ****************************************************
              *                     Changes                      *
              ****************************************************

* Saving the game now costs Silver (100s times Alex's level). This was by far 
the best change in the US version of Eternal Blue, and I know everyone will be 
euphoric to have this same experience in The Silver Star!
* Trying to load checkpoints will now reset the game. While this might appear to 
be a bug, if you think about it, it's really just a logical extension of the 
improvements to the save system!
* All enemies have their stats raised substantially.
* All items now cost much more.

Other changes in the US version (e.g. the removed English intro screen, the 
interchanged intro cutscene and title screen, the wonderful wonderful made-up 
script) have -- of course! -- been kept.

For further details on the alterations in the US version, see this page: 
https://tcrf.net/Lunar:_The_Silver_Star

              ****************************************************
              *               Patching Instructions              *
              ****************************************************

--- WHAT YOU'LL NEED ---
* A BIN/CUE or ISO/WAV format disc image of the US version of Lunar: The Silver 
Star (Sega CD).
* If you're on Windows, the xdelta patching utility (http://xdelta.org/) is 
provided in this distribution. On other platforms, you'll need to acquire 
version 3.0.8 or later on your own.

--- AUTOMATIC PATCHING METHOD (WINDOWS) ---

If you're using Windows, move your disc image files into the same directory as 
the program and do one of these as appropriate:
  * If you have a BIN/CUE disc image, drag and drop the BIN file (or IMG file) 
onto binpatch.bat.
  * If you have an ISO/WAV disc image, drag and drop the ISO file onto 
isopatch.bat. Note that your ISO/WAV files **must** use the standard numbering 
format "File 01.iso", "File 02.wav", etc. If the files are named something else, 
like "File (Track 01 of 52).iso", you'll need to rename them.

If everything works, this should produce the patched game under the name 
"LunarTheSilverStarWorked_##". To play it, make sure the file 
"LunarTheSilverStarWorked.cue" (included with the patch) is in the same 
directory as everything else and then load it in an emulator, or burn it to a CD 
for use on real hardware.

If this doesn't work, try using the manual patching method below to diagnose the 
problem.

--- MANUAL PATCHING METHOD ---

--- CONVERTING FROM BIN/CUE TO ISO ---
If you have a BIN/CUE image (or the equivalent format IMG/CUE), you'll need to 
convert it to ISO/WAV before you can patch it. I'd recommend using BinChunker 
(a.k.a. bchunk -- homepage http://he.fi/bchunk/) to do this.

* On Windows, you can use the included bchunk.exe (courtesy of elmer). If you 
don't want to use bchunk, there are also many "shareware"/commercial utilities 
that can do this task, though they may or may not output the same ISO as bchunk.
* On Linux, it should be available from your distro's repos, or of course you 
can build from source.
* On Mac, you can build from source, or perhaps get binaries wherever Mac people 
get their binaries from.

To convert, open a command prompt and navigate to the folder containing the 
BIN/CUE, then run the following command:

bchunk -w LunarTheSilverStarUS.bin LunarTheSilverStarUS.cue 
LunarTheSilverStarUS_

(substituting the names of your BIN/CUE files, obviously -- remember to put 
quotes around them if they have spaces in them. **Don't rename them** -- this 
will cause the conversion to fail unless you also modify the CUE file itself.) 
This should generate 52 files: LunarTheSilverStarUS_01.iso, 
LunarTheSilverStarUS_02.wav, and LunarTheSilverStarUS_03.wav, and so on up to 
LunarTheSilverStarUS_52.wav.

--- PATCHING STEPS---
1. First, !!!***verify that your ISO has the correct MD5 hash***!!! It should be 
e770f927cb95fbafd4cf1cde57143912. If it isn't, the patch almost certainly won't 
work. You can obtain this by using the md5sum utility on *nix, or the FCIV 
utility (https://support.microsoft.com/en-us/kb/889768) on Windows.

2. Use xdelta to apply LunarTheSilverStarWorked.xdelta to your ISO. If you're 
using the command line, this would look something like:

xdelta3 -d -s LunarTheSilverStarWorked.xdelta LunarTheSilverStarUS_01.iso 
LunarTheSilverStarWorked_01.iso

If you use a GUI wrapper, it should be self-explanatory, but make sure the 
output file is named LunarTheSilverStarWorked_01.iso.

3. That's technically all the patching required, but assuming you want to play 
on an emulator, we now need to make sure the CD audio files are properly 
associated with the ISO or it will likely hang when it needs to play them. 
First, make sure your patched ISO is named LunarTheSilverStarWorked_01.iso, then 
rename the audio files produced from the BIN/CUE conversion process to 
LunarTheSilverStarWorked_02.wav, LunarTheSilverStarWorked_03.wav, and so on up 
to LunarTheSilverStarWorked_52.wav.

4. A CUE file named LunarTheSilverStarWorked.cue is included with this patch. 
Move it to the same directory as your ISO and WAV files.

5. Test that the game works by loading LunarTheSilverStarWorked.cue in your 
emulator. Press A, B, or C at the BIOS startup screen to start the CD player, 
and make sure the number of tracks listed is 52.

--- TROUBLESHOOTING ---
* If the CD audio tracks go out of sync, and you patched an ISO/WAV rip, check 
your audio tracks. If they start with a couple of seconds of silence each, the 
software used to rip the disc chose to bake the pregaps into the audio files, 
which is not the standard format the included CUE file expects. You can rectify 
this by chopping the first couple of seconds of each audio file off in an editor 
such as Audacity.
* If the automatic patching method fails to produce any audio files, make sure 
all your files are named in the format "Filename ##.wav". The patcher expects to 
see a two-digit number directly before the file extension; without that, it 
can't find the tracks.
* If the patched ISO won't run, check the MD5 hashes of your original ISO and 
the patched ISO. The correct hashes are given in the steps above. If either of 
them doesn't match, try a different method for converting the BIN/CUE to ISO, or 
using a BIN/CUE generated by a different program.
* If loading LunarTheSilverStarWorked.cue doesn't work, try loading 
LunarTheSilverStarWorked_01.iso by itself. If that works, make sure all your 
files are named exactly as described above, and that the names in the CUE file 
match your audio files. CUE files are plaintext; just open it in Notepad or 
whatever.
* If your ISO has associated sound files in some format other than WAV (or your 
emulator doesn't support WAV files), you'll need to either convert them to WAV 
or modify the CUE file to use a different format. In the latter case, change 
(for example) all occurences of WAVE to MP3, and make sure the filenames are 
correct.
* If the game works fine but crashes when CD audio should play, your audio files 
aren't properly associated with the ISO. Check that your filenames match what's 
described in LunarTheSilverStarWorked.cue.

              ****************************************************
              *                  Known Issues                    *
              ****************************************************

* It's still possible to win battles. With enough grinding, the game is probably 
even completable!

              ****************************************************
              *                 Version History                  *
              ****************************************************

Version 0 (4/1/17)
  * Initial release.

              ****************************************************
              *                  Special Thanks                  *
              ****************************************************

* Victor Ireland, for his everlasting contributions to game design
* elmer
* Everyone on ROMhacking.net who provided feedback and support
